Chebyshev fit: Given a function func, lower and upper limits of the interval [a,b], and a maximum degree n, this routine computes the n coefficients c(k) such that func(x) approximately = SUMM_(k=1)^(k=n)[c(k)*T(k-1)(y)]-c(1)/2, where y and x are related by (5.8.10). This routine is to be used with moderately large n (e.g., 30 or 50), the array of cs subsequently to be truncated at the smaller value m such that c(m+1) and subsequent elements are negligible. Parameters: Maximum expected value of n, and ð.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp) | :: | a | ||||
real(kind=wp) | :: | b | ||||
real(kind=wp) | :: | c(n) | ||||
integer | :: | n | ||||
real | :: | func |